package leftMain;

//package org.dlsu.mt.parser;

import org.dlsu.mt.parser.FStructure;
import org.dlsu.mt.parser.TRANSFER.Transfer;
import org.dlsu.mt.parser.dictionary.Dictionary;
import org.dlsu.mt.parser.dictionary.Global;

/*
import org.dlsu.mt.parser.*;
import org.dlsu.mt.*;
import java.util.*;
import java.io.*;
*/
public class TransferModule
{
	private Dictionary language1Dict;
	private Dictionary language2Dict;
	private char directionOfTranslation;
	private Transfer transfer;
		
	private Global glob;
		
	public TransferModule(Dictionary ed, Dictionary fd, Global glob){
		
		language1Dict = ed;
		language2Dict = fd;
		
		this.glob = glob;
		
		this.glob.setLang1Dict(language1Dict);
		this.glob.setLang2Dict(language2Dict);
				
		transfer = new Transfer(this.glob);
	}
	
	public FStructure translate(FStructure inputF)throws Exception{
		
		FStructure outputF;		
		
		outputF = transfer.transfer(inputF, directionOfTranslation);
		
		return outputF;
		
	}
	
	public void setDirectionOfTranslation(char lang){
		directionOfTranslation = lang;
	}
	
	
	
}